#ifndef _LIST_H
#define _LIST_H

#define EMPTY_LIST	-1

typedef struct list_group_s list_group;
typedef struct list_s threadList;

int initListGroup(list_group** l, int size);

void closeListGroup(list_group* l);

int createNewList(list_group* group, threadList** l);

void closeList(threadList* l);

int createNewElement(list_group* group);

int removeFromList(threadList* l, int index);

int removeNodeList(threadList* l, int index);

void addTailList(threadList* l, int index);

void addHeadList(threadList* l, int index);

void addOrderedToList(threadList* l, int index);

void move_element(threadList* from, threadList* to, int index);

int get_element(threadList* l);

int next_element(threadList* l);

int previous_element(threadList* l);

void print_list(threadList* l);

int get_list_size(threadList* l);

int get_list_free_size(list_group* l);

threadList* get_list(list_group* group, int index);

#endif
